import request from '@/utils/request'

// 查询微贴子列表
export function listMicroposts(query) {
  return request({
    url: '/manage/microposts/list',
    method: 'get',
    params: query
  })
}

// 查询微贴子详细
export function getMicroposts(postId) {
  return request({
    url: '/manage/microposts/' + postId,
    method: 'get'
  })
}

// 新增微贴子
export function addMicroposts(data) {
  return request({
    url: '/manage/microposts',
    method: 'post',
    data: data
  })
}

// 修改微贴子
export function updateMicroposts(data) {
  return request({
    url: '/manage/microposts',
    method: 'put',
    data: data
  })
}

// 删除微贴子
export function delMicroposts(postId) {
  return request({
    url: '/manage/microposts/' + postId,
    method: 'delete'
  })
}
